]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Use less ambiguous symbols for radio options
authorSam Hewitt <snwh@gnome.org>
Thu, 23 Nov 2023 14:46:18 +0000 (11:16 -0330)
committerMarge Bot <marge-bot@gnome.org>
Sat, 2 Dec 2023 10:11:10 +0000 (10:11 +0000)
- new checked and unchecked dot ornament assets
- updated JS with a NO_DOT ornament state, replaced instances of NONE with this

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3027>

data/gnome-shell-icons.gresource.xml
data/icons/scalable/actions/ornament-check-symbolic.svg
data/icons/scalable/actions/ornament-dot-checked-symbolic.svg [new file with mode: 0644]
data/icons/scalable/actions/ornament-dot-symbolic.svg [deleted file]
data/icons/scalable/actions/ornament-dot-unchecked-symbolic.svg [new file with mode: 0644]
data/org.gnome.Shell-symbolic.Source.svg
js/gdm/loginDialog.js
js/ui/keyboard.js
js/ui/popupMenu.js
js/ui/status/keyboard.js
js/ui/status/network.js

index 680cffced155aff550a2ca996cf9f3f11822498c..d8d6344fa454a821d037ca559307e9497d6868f5 100644 (file)
@@ -6,7 +6,8 @@
     <file>scalable/actions/carousel-arrow-previous-symbolic.svg</file>
     <file>scalable/actions/dark-mode-symbolic.svg</file>
     <file>scalable/actions/ornament-check-symbolic.svg</file>
-    <file>scalable/actions/ornament-dot-symbolic.svg</file>
+    <file>scalable/actions/ornament-dot-checked-symbolic.svg</file>
+    <file>scalable/actions/ornament-dot-unchecked-symbolic.svg</file>
     <file>scalable/actions/pointer-double-click-symbolic.svg</file>
     <file>scalable/actions/pointer-drag-symbolic.svg</file>
     <file>scalable/actions/pointer-primary-click-symbolic.svg</file>
index 7a9551fadca1f015f4f628309c10dab2f4377892..b32ed8c37b2e0418b48495380c33bea5b2000150 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
-    <path d="m 13.753906 4.660156 c 0.175782 -0.199218 0.261719 -0.460937 0.246094 -0.726562 c -0.019531 -0.265625 -0.140625 -0.511719 -0.339844 -0.6875 c -0.199218 -0.175782 -0.460937 -0.261719 -0.726562 -0.246094 c -0.265625 0.019531 -0.511719 0.140625 -0.6875 0.339844 l -6.296875 7.195312 l -2.242188 -2.242187 c -0.390625 -0.390625 -1.023437 -0.390625 -1.414062 0 c -0.1875 0.1875 -0.292969 0.441406 -0.292969 0.707031 s 0.105469 0.519531 0.292969 0.707031 l 3 3 c 0.195312 0.195313 0.464843 0.304688 0.738281 0.292969 c 0.277344 -0.007812 0.539062 -0.132812 0.722656 -0.339844 z m 0 0" fill="#2e3436"/>
+    <path d="m 13.75 4.660156 c 0.175781 -0.199218 0.261719 -0.460937 0.246094 -0.726562 c -0.019532 -0.265625 -0.140625 -0.511719 -0.339844 -0.6875 c -0.199219 -0.175782 -0.460938 -0.261719 -0.726562 -0.246094 c -0.265626 0.019531 -0.511719 0.140625 -0.6875 0.339844 l -6.296876 7.195312 l -2.242187 -2.242187 c -0.390625 -0.390625 -1.023437 -0.390625 -1.414063 0 c -0.1875 0.1875 -0.292968 0.441406 -0.292968 0.707031 s 0.105468 0.519531 0.292968 0.707031 l 3 3 c 0.195313 0.195313 0.464844 0.304688 0.738282 0.292969 c 0.277344 -0.007812 0.539062 -0.132812 0.722656 -0.339844 z m 0 0" fill="#2e3436"/>
 </svg>
diff --git a/data/icons/scalable/actions/ornament-dot-checked-symbolic.svg b/data/icons/scalable/actions/ornament-dot-checked-symbolic.svg
new file mode 100644 (file)
index 0000000..9ac93a4
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
+    <path d="m 8 5 c 1.652344 0 3 1.34375 3 3 s -1.347656 3 -3 3 c -1.65625 0 -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 z m 0 0" fill="#2e3436"/>
+    <path d="m 7.992188 0 c 4.40625 0 8 3.59375 8 8 s -3.59375 8 -8 8 s -8.0000005 -3.59375 -8.0000005 -8 s 3.5937505 -8 8.0000005 -8 z m 0 2 c -3.320313 0 -6 2.679688 -6 6 s 2.679687 6 6 6 c 3.320312 0 6 -2.679688 6 -6 s -2.679688 -6 -6 -6 z m 0 0" fill="#2e3435" fill-opacity="0.2"/>
+</svg>
diff --git a/data/icons/scalable/actions/ornament-dot-symbolic.svg b/data/icons/scalable/actions/ornament-dot-symbolic.svg
deleted file mode 100644 (file)
index e9d7ec1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
-    <path d="m 11 8 c 0 1.65625 -1.34375 3 -3 3 s -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 s 3 1.34375 3 3 z m 0 0" fill="#2e3436"/>
-</svg>
diff --git a/data/icons/scalable/actions/ornament-dot-unchecked-symbolic.svg b/data/icons/scalable/actions/ornament-dot-unchecked-symbolic.svg
new file mode 100644 (file)
index 0000000..192429f
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
+    <path d="m 7.992188 0 c 4.40625 0 8 3.59375 8 8 s -3.59375 8 -8 8 c -4.402344 0 -8.0000005 -3.59375 -8.0000005 -8 s 3.5976565 -8 8.0000005 -8 z m 0 2 c -3.320313 0 -6 2.679688 -6 6 s 2.679687 6 6 6 c 3.320312 0 6 -2.679688 6 -6 s -2.679688 -6 -6 -6 z m 0 0" fill="#2e3435" fill-opacity="0.2"/>
+</svg>
index 0f02fdc0ee6dcb6484b08cab99dd3e0595cb4e3d..31cc6d6ebd2a6b21a67930d50931df7b6113674d 100644 (file)
@@ -21,9 +21,9 @@
      borderopacity="1.0"
      inkscape:pageopacity="1"
      inkscape:pageshadow="2"
-     inkscape:zoom="1"
-     inkscape:cx="224.5"
-     inkscape:cy="258.5"
+     inkscape:zoom="16"
+     inkscape:cx="15.46875"
+     inkscape:cy="461.34375"
      inkscape:document-units="px"
      inkscape:current-layer="layer2"
      showgrid="false"
          d="m 82.95312,664.60753 2.41797,13.21094 3.23828,-2.39844 2.05469,2.64844 c 1.03125,1.43359 3.14844,-0.21094 2.01172,-1.5625 l -2.01562,-2.59375 2.98437,-2.17579 z m 0,0"
          fill="#2e3436"
          id="path2-35" /></g><g
+       transform="matrix(-1,0,0,1,196.0059,-35)"
+       inkscape:label="menu item check radio"
+       id="g4179-7-8"><title
+         id="title146367">ornament-dot-unchecked</title><rect
+         id="rect3246-4-6-5-6"
+         width="16"
+         height="16"
+         x="160"
+         y="487"
+         style="fill:none" /><path
+         d="m 168.00586,487 c -4.40435,0 -8,3.59563 -8,8 0,4.40433 3.59565,8 8,8 4.40433,0 8,-3.59567 8,-8 0,-4.40437 -3.59568,-8 -8,-8 z m 0,2 c 3.32155,0 6,2.6784 6,6 0,3.32154 -2.67846,6 -6,6 -3.32158,0 -6,-2.67845 -6,-6 0,-3.3216 2.67842,-6 6,-6 z"
+         id="path8781"
+         style="fill:#2e3435;fill-opacity:0.2" /></g><g
        id="g13"
        inkscape:label="window close exit"
        transform="translate(-64,60)"><title
          id="path10"
          style="opacity:1;fill:#231e2d;fill-opacity:0.2;stroke-width:4;stroke-linecap:square;stroke-linejoin:round;stroke-dashoffset:2"
          d="m 157.75,476 h 1.5 c 0.4155,0 0.75,0.3345 0.75,0.75 v 1.5 c 0,0.4155 -0.3345,0.75 -0.75,0.75 h -1.5 c -0.4155,0 -0.75,-0.3345 -0.75,-0.75 v -1.5 c 0,-0.4155 0.3345,-0.75 0.75,-0.75 z"
-         sodipodi:nodetypes="sssssssss" /></g></g></svg>
+         sodipodi:nodetypes="sssssssss" /></g><g
+       transform="matrix(-1,0,0,1,216.0059,-35)"
+       inkscape:label="menu item check radio"
+       id="g12"><title
+         id="title10">ornament-check</title><rect
+         id="rect11"
+         width="16"
+         height="16"
+         x="160"
+         y="487"
+         style="fill:none" /><path
+         d="m 162.2479,491.66197 c -0.17578,-0.19922 -0.26171,-0.46094 -0.24609,-0.72657 0.0195,-0.26562 0.14063,-0.51172 0.33984,-0.6875 0.19922,-0.17578 0.46094,-0.26172 0.72657,-0.24609 0.26562,0.0195 0.51172,0.14062 0.6875,0.33984 l 6.29687,7.19532 2.24219,-2.24219 c 0.39062,-0.39063 1.02344,-0.39063 1.41406,0 0.1875,0.1875 0.29297,0.4414 0.29297,0.70703 0,0.26562 -0.10547,0.51953 -0.29297,0.70703 l -3,3 c -0.19531,0.19531 -0.46484,0.30469 -0.73828,0.29297 -0.27734,-0.008 -0.53906,-0.13281 -0.72266,-0.33984 z m 0,0"
+         fill="#2e3436"
+         id="path1-3" /></g><g
+       id="g21"
+       inkscape:label="menu item check radio"><title
+         id="title21">ornament-dot-checked</title><path
+         id="path9555"
+         d="m 8.006,457 c 1.65555,0 3,1.34444 3,3 0,1.65555 -1.34445,3 -3,3 -1.65555,0 -3,-1.34445 -3,-3 0,-1.65556 1.34445,-3 3,-3 z"
+         style="fill:#2e3436;fill-opacity:1"
+         sodipodi:nodetypes="sssss" /><path
+         id="path12"
+         d="m 8,452 c 4.40433,0 8,3.59566 8,8 0,4.40433 -3.59566,8 -8,8 -4.40434,0 -8,-3.59566 -8,-8 0,-4.40435 3.59566,-8 8,-8 z m 0,2 c -3.32157,0 -6,2.67843 -6,6 0,3.32156 2.67843,6 6,6 3.32156,0 6,-2.67844 6,-6 0,-3.32157 -2.67844,-6 -6,-6 z"
+         style="fill:#2e3435;fill-opacity:0.2"
+         sodipodi:nodetypes="ssssssssss" /><rect
+         id="rect19"
+         width="16"
+         height="16"
+         x="-16.005899"
+         y="452"
+         style="fill:none"
+         transform="scale(-1,1)" /></g></g></svg>
index 3be7f42ec0cacaf5118a3ee230957869777efa40..ba2a1ad71608d1d87374cd637269f851f1fa0240 100644 (file)
@@ -364,7 +364,7 @@ const SessionMenuButton = GObject.registerClass({
             if (itemIds[i] === this._activeSessionId)
                 this._items[itemIds[i]].setOrnament(PopupMenu.Ornament.DOT);
             else
-                this._items[itemIds[i]].setOrnament(PopupMenu.Ornament.NONE);
+                this._items[itemIds[i]].setOrnament(PopupMenu.Ornament.NO_DOT);
         }
     }
 
index da9137d5f68591c9e3b1408533b1931d11880694..6ceb2032b7229fd33438dba2d1687ee400949e77 100644 (file)
@@ -218,7 +218,7 @@ class LanguageSelectionPopup extends PopupMenu.PopupMenu {
             item.can_focus = false;
             item.setOrnament(is === inputSourceManager.currentSource
                 ? PopupMenu.Ornament.DOT
-                : PopupMenu.Ornament.NONE);
+                : PopupMenu.Ornament.NO_DOT);
         }
 
         this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
index 2977d3d61d07d0824ff3542a623a8ff9f6e66cc9..1204978e7e8c696df828d67defc7aa8b6863e698 100644 (file)
@@ -19,6 +19,7 @@ export const Ornament = {
     DOT: 1,
     CHECK: 2,
     HIDDEN: 3,
+    NO_DOT: 4,
 };
 
 function isPopupMenuItemVisible(child) {
@@ -256,8 +257,11 @@ export const PopupBaseMenuItem = GObject.registerClass({
         this._ornament = ornament;
 
         if (ornament === Ornament.DOT) {
-            this._ornamentIcon.icon_name = 'ornament-dot-symbolic';
+            this._ornamentIcon.icon_name = 'ornament-dot-checked-symbolic';
             this.add_accessible_state(Atk.StateType.CHECKED);
+        } else if (ornament === Ornament.NO_DOT) {
+            this._ornamentIcon.icon_name = 'ornament-dot-unchecked-symbolic';
+            this.remove_accessible_state(Atk.StateType.CHECKED);
         } else if (ornament === Ornament.CHECK) {
             this._ornamentIcon.icon_name = 'ornament-check-symbolic';
             this.add_accessible_state(Atk.StateType.CHECKED);
@@ -271,7 +275,7 @@ export const PopupBaseMenuItem = GObject.registerClass({
     }
 
     _updateOrnamentStyle() {
-        if (this._ornament !== Ornament.HIDDEN)
+        if (this._ornament === Ornament.CHECK || this._ornament === Ornament.NONE)
             this.add_style_class_name('popup-ornamented-menu-item');
         else
             this.remove_style_class_name('popup-ornamented-menu-item');
index cad5f2a869a6e94e81565a61b3b8fca210e687ab..e285eb4950c4ca0dd6e282798a366b48d07e773f 100644 (file)
@@ -27,7 +27,7 @@ class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem {
     _init(displayName, shortName) {
         super._init();
 
-        this.setOrnament(PopupMenu.Ornament.NONE);
+        this.setOrnament(PopupMenu.Ornament.NO_DOT);
 
         this.label = new St.Label({
             text: displayName,
@@ -932,7 +932,7 @@ class InputSourceIndicator extends PanelMenu.Button {
         let newSource = this._inputSourceManager.currentSource;
 
         if (oldSource) {
-            this._menuItems[oldSource.index].setOrnament(PopupMenu.Ornament.NONE);
+            this._menuItems[oldSource.index].setOrnament(PopupMenu.Ornament.NO_DOT);
             this._indicatorLabels[oldSource.index].hide();
         }
 
@@ -1011,7 +1011,7 @@ class InputSourceIndicator extends PanelMenu.Button {
                 radioGroup.push(item);
                 item.radioGroup = radioGroup;
                 item.setOrnament(prop.get_state() === IBus.PropState.CHECKED
-                    ? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
+                    ? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NO_DOT);
                 item.connect('activate', () => {
                     if (item.prop.get_state() === IBus.PropState.CHECKED)
                         return;
@@ -1024,7 +1024,7 @@ class InputSourceIndicator extends PanelMenu.Button {
                             ibusManager.activateProperty(
                                 item.prop.get_key(), IBus.PropState.CHECKED);
                         } else {
-                            group[j].setOrnament(PopupMenu.Ornament.NONE);
+                            group[j].setOrnament(PopupMenu.Ornament.NO_DOT);
                             group[j].prop.set_state(IBus.PropState.UNCHECKED);
                             ibusManager.activateProperty(
                                 group[j].prop.get_key(), IBus.PropState.UNCHECKED);
index 958d3c0587d0c77f391a38c2c6361ad7dd62024d..d9547eed73966e7b63975fdbbe7814a919838798 100644 (file)
@@ -379,7 +379,7 @@ class NMConnectionItem extends NMMenuItem {
             this.accessible_name = this.name;
             this.accessible_role = Atk.Role.CHECK_MENU_ITEM;
             this.setOrnament(this.is_active
-                ? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
+                ? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NO_DOT);
         } else {
             this.accessible_name = this._getAccessibleName();
             this._subtitle.text = this._getSubtitleLabel();